<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>小章火车票务-后台管理系统</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" type="text/css" href="./res/css/font.css">
    <link rel="stylesheet" type="text/css" href="./res/css/xadmin.css">
    <link rel="stylesheet" type="text/css" href="./res/layui/css/layui.css"/>
</head>
<body>
<!-- 顶部开始 -->
<div class="container">
    <div class="logo"><a href="index.html">小章票务</a></div>
    <div class="left_open">
        <i title="展开左侧栏" class="layui-icon layui-icon-app"></i>
    </div>
    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;"><span id="loginName">登录账户名称</span></a>
            <dl class="layui-nav-child">
                <!-- 二级菜单 -->
                <dd><a id="admintext">账号信息</a></dd>
                <dd><a href="/login.html" id="logoutBtn">安全退出</a></dd>
            </dl>
        </li>
    </ul>

</div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div class="left-nav" >
    <div id="side-nav">
        <ul id="nav">
            <li>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-rate-solid"></i>
                    <cite>收藏管理</cite>
                    <i class="iconfont nav_right">&#xe6a7;</i>
                </a>
                <ul class="sub-menu">
                    <li><a _href="html/favorite-add.html"><i class="iconfont">&#xe6a7;</i><cite>添加收藏夹</cite></a></li>
                    <li><a _href="html/favorite-station.html"><i class="iconfont">&#xe6a7;</i><cite>车站收藏</cite></a></li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-engine"></i>
                    <cite>车次管理</cite>
                    <i class="iconfont nav_right">&#xe6a7;</i>
                </a>
                <ul class="sub-menu">
                    <li><a _href="html/line-add.html"><i class="iconfont">&#xe6a7;</i><cite>添加车次</cite></a></li>
                    <li><a _href="html/line-list.html"><i class="iconfont">&#xe6a7;</i><cite>车次列表</cite></a></li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-transfer"></i>
                    <cite>站台管理</cite>
                    <i class="iconfont nav_right">&#xe6a7;</i>
                </a>
                <ul class="sub-menu">
                    <li><a _href="html/station-add.html"><i class="iconfont">&#xe6a7;</i><cite>添加站台</cite></a></li>
                    <li><a _href="html/station-list.html"><i class="iconfont">&#xe6a7;</i><cite>所有站台</cite></a></li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-form"></i>
                    <cite>订单管理</cite>
                    <i class="iconfont nav_right">&#xe6a7;</i>
                </a>
                <ul class="sub-menu">
                    <li><a _href="html/order-add.html"><i class="iconfont">&#xe6a7;</i><cite>订单新建</cite></a></li>
                    <li><a _href="html/order-list.html"><i class="iconfont">&#xe6a7;</i><cite>订单列表</cite></a></li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-user"></i>
                    <cite>用户管理</cite>
                    <i class="iconfont nav_right">&#xe6a7;</i>
                </a>
                <ul class="sub-menu">
                    <li><a _href="html/user-list.html"><i class="iconfont">&#xe6a7;</i><cite>用户列表</cite></a></li>
                    <li><a _href="html/user-blacklist.html"><i class="iconfont">&#xe6a7;</i><cite>黑名单</cite></a></li>
                    <li><a _href="html/user-add.html"><i class="iconfont">&#xe6a7;</i><cite>注册账户</cite></a></li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-set"></i>
                    <cite>系统管理</cite>
                    <i class="iconfont nav_right">&#xe6a7;</i>
                </a>
                <ul class="sub-menu">
                    <li><a _href="html/admin-add.html"><i class="iconfont">&#xe6a7;</i><cite>新增管理员</cite></a></li>
                    <li><a _href="html/admin-list.html"><i class="iconfont">&#xe6a7;</i><cite>管理员列表</cite></a></li>
                    <li><a _href="html/admin-update.html"><i class="iconfont">&#xe6a7;</i><cite>修改密码</cite></a></li>
                </ul>
            </li>
        </ul>
    </div>
</div>
<!-- <div class="x-slide_left"></div> -->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <ul class="layui-tab-title">
            <li class="home" id="home"><i class="layui-icon">&#xe68e;</i>我的桌面</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <iframe src='html/home.html' name="iframe" style="border: 0"  class="x-iframe"></iframe>
            </div>
        </div>
    </div>
</div>
<div class="page-content-bg"></div>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
<script src="./res/js/jquery.min.js"></script>
<script src="./res/layui/layui.js"></script>
<script src="./res/js/xadmin.js"></script>
<script type="text/javascript">
    layui.use(['layer', 'form', 'element', 'upload', 'jquery', 'table'], function () {
        //模块初始化
        var layer = layui.layer;
        var form = layui.form;
        var element = layui.element;
        var upload = layui.upload;
        var $ = layui.jquery;
        var table = layui.table;

        $('#home').on('click',function(){
            location.reload();
        })        

        var field = sessionStorage.getItem('admin')
        let admin = JSON.parse(field)
        $('#loginName').text(admin.username)
        console.log(admin)
        

        $('#admintext').on('click',function(){
            console.log(admin)
            layer.open({
                type:1,                                //弹层类型 1：页面层
                content:$('#user'),         //弹层dom元素
                closeBtn:2,                           //标题栏关闭图标样式  
                shadeClose:true,
                area: ['600px', '420px'],
                success:function(layero,index,that){  //弹层被成功打开后回调  
                    layero.find('#id').text(admin.id)
                    layero.find('#username').text(admin.username)
                    layero.find('#password').text(admin.password)
                    layero.find('#addtime').text(admin.addtime)
                    layero.find('#status').html(admin.status===0 ? '<div class="layui-badge layui-bg-blue">正常</div>' : '<div class="layui-badge layui-bg-red">禁用</div>')
                    layero.find('#salt').text(admin.salt)
                },
                btn:['关闭'],   //自定义按钮
                btnAlign:'c',   //自定义按钮位置 l-左  c-中  r-右
                btn1:function(){    //自定按钮事件
                    layer.closeAll()
                }
            })
        })
        

        


    });
</script>
<div id="user" class="layui-fluid">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>账号信息</legend>
        <div id="userInfoDialog">
            <table class="layui-table" lay-size="sm">
                <tr>
                    <td>ID</td>
                    <td><span id="id"></span></td>
                </tr>
                <tr>
                    <td>用户名</td>
                    <td><span id="username"></span></td>
                </tr>
                    <td>状态</td>
                    <td><span id="status"></span></td>
                </tr>
                <tr>
                    <td>注册时间</td>
                    <td><span id="addtime"></span></td>
                </tr>
                <tr>
                    <td>密码</td>
                    <td><span id="password"></span></td>
                </tr>
                <tr>
                    <td>盐</td>
                    <td><span id="salt"></span></td>
                </tr>
            </table>
        </div>
    </fieldset>
</div>
</body>
</html>
